<?php
/**
 * Created by PhpStorm.
 * User: Adminstratot
 * Date: 2019/4/22
 * Time: 0:50
 */
namespace app\sample\controller;
use think\Request;

class Test{
    /*public function hello($id,$name,$age){
        echo $id;
        echo $name;
        echo $age;
    }*/
    public function hello(Request $request){
        /*$id=Request::instance()->param('id');
        $name=Request::instance()->param('name');
        $age=Request::instance()->param('age');*/
        //$age=input('param.age');    //助手函数获取单个参数

        $all=$request->param();

        /*
        //获取所有请求的变量
        $all=input('param.');    //助手函数获取全部参数
        //$all=Request::instance()->param();
        var_dump($all);

        //获取?后面的参数
        $get=Request::instance()->get();
        var_dump($get);

        //获取路径的参数
        $route=Request::instance()->route();
        var_dump($route);

        //获取post后面的参数
        $post=Request::instance()->post();
        var_dump($post);
        */
    }
}